package com.smart.campus.school.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smart.campus.school.mapper.AttendanceGroupMapper;
import com.smart.campus.school.domain.AttendanceGroup;
import com.smart.campus.school.service.IAttendanceGroupService;
import com.smart.campus.common.core.text.Convert;

/**
 * 考勤组Service业务层处理
 * 
 * @author Zhihe.Li
 * @date 2020-10-21
 */
@Service
public class AttendanceGroupServiceImpl implements IAttendanceGroupService 
{
    @Autowired
    private AttendanceGroupMapper attendanceGroupMapper;

    /**
     * 查询考勤组
     * 
     * @param id 考勤组ID
     * @return 考勤组
     */
    @Override
    public AttendanceGroup selectAttendanceGroupById(Long id)
    {
        return attendanceGroupMapper.selectAttendanceGroupById(id);
    }

    /**
     * 查询考勤组列表
     * 
     * @param attendanceGroup 考勤组
     * @return 考勤组
     */
    @Override
    public List<AttendanceGroup> selectAttendanceGroupList(AttendanceGroup attendanceGroup)
    {
        return attendanceGroupMapper.selectAttendanceGroupList(attendanceGroup);
    }

    /**
     * 新增考勤组
     * 
     * @param attendanceGroup 考勤组
     * @return 结果
     */
    @Override
    public int insertAttendanceGroup(AttendanceGroup attendanceGroup)
    {
        return attendanceGroupMapper.insertAttendanceGroup(attendanceGroup);
    }

    /**
     * 修改考勤组
     * 
     * @param attendanceGroup 考勤组
     * @return 结果
     */
    @Override
    public int updateAttendanceGroup(AttendanceGroup attendanceGroup)
    {
        return attendanceGroupMapper.updateAttendanceGroup(attendanceGroup);
    }

    /**
     * 删除考勤组对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAttendanceGroupByIds(String ids)
    {
        return attendanceGroupMapper.deleteAttendanceGroupByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除考勤组信息
     * 
     * @param id 考勤组ID
     * @return 结果
     */
    @Override
    public int deleteAttendanceGroupById(Long id)
    {
        return attendanceGroupMapper.deleteAttendanceGroupById(id);
    }
}
